package org.zasadnyy.redlions.players.client.ds;

import org.zasadnyy.redlions.players.shared.model.PlayerItem;

import com.smartgwt.client.data.Record;

public class PlayerRecord extends Record {
	
	public PlayerRecord(PlayerItem player){
		super();
		setAttribute(PlayerItem.ID, player.getId());
		setAttribute(PlayerItem.NAME, player.getName());
		setAttribute(PlayerItem.SURNAME, player.getSurname());
		setAttribute(PlayerItem.PHOTO_URL, player.getPhotoUrl());
		setAttribute(PlayerItem.BIRTHDAY, player.getBirtday());
		setAttribute(PlayerItem.NATIVE_CITY, player.getNativeCity());
		setAttribute(PlayerItem.PLAYS_FROM, player.getPlaysFrom());
		setAttribute(PlayerItem.TOURNAMENTS, new TournamentsRecord(player.getTournaments()));
	}

}
